package com.admin.education.services.Interfaces;

import com.admin.education.common.exceptions.BadRequestException;
import com.admin.education.common.exceptions.ResourceNotFoundException;
import com.admin.education.dataTransferObject.PageRequest;
import com.admin.education.dataTransferObject.PageResponse;
import com.admin.education.dataTransferObject.ServicesExcuteResult;
import com.admin.education.dataTransferObject.votes.Request.CreateVotesRequest;
import com.admin.education.dataTransferObject.votes.Request.UpdateVotesRequest;
import com.admin.education.dataTransferObject.votes.Request.VotesRequest;
import com.admin.education.dataTransferObject.votes.VotesTransfer;

import javax.validation.Valid;
import java.util.List;

public interface IVotesService {
    ServicesExcuteResult<List<VotesTransfer>> queryVotes(long categorys) throws ResourceNotFoundException;
    ServicesExcuteResult<VotesTransfer> queryVotesById(long votesId) throws ResourceNotFoundException;
    ServicesExcuteResult ballots(long votesId, String openId, List<VotesRequest> votesRequests) throws ResourceNotFoundException, BadRequestException;
    ServicesExcuteResult creaateVotes(@Valid CreateVotesRequest createVotesRequest) throws BadRequestException;
    ServicesExcuteResult deleteVotes(long votesId) throws ResourceNotFoundException;
    ServicesExcuteResult<PageResponse<VotesTransfer>> queryVotes(@Valid PageRequest pageRequest);
    ServicesExcuteResult updateVotes(long votesId, @Valid UpdateVotesRequest updateVotesRequest) throws ResourceNotFoundException, BadRequestException;
}
